/*
 * @Author: cgl
 * @Date: 2023-04-18 18:12:13
 * @LastEditors: cgl
 * @LastEditTime: 2023-07-31 15:12:33
 * @FilePath: \public-health-emergencies-fed:\radiation-hygiene-fe\src\api\basicData\template.js
 * @Description: 
 * 
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved. 
 */
import request from '@/utils/request'

// 查询模版列表
export function templateList(data) {
  return request({
    url: '/basic/template/list',
    method: 'post',
    data,
  })
}
// 保存模版
export function templateAdd(data) {
  return request({
    url: '/basic/template/add',
    method: 'post',
    data,
  })
}
// 获取单个信息
export function templateDetail(templateId) {
  return request({
    url: '/basic/template/getInfo/' + templateId,
    method: 'get'
  })
}
// 修改模版
export function templateUpdate(data) {
  return request({
    url: `/basic/template/update`,
    method: "post",
    data,
  });
}
// 删除模板
export function templateRemove(templateId) {
  return request({
    url: '/basic/template/remove/' + templateId,
    method: 'get'
  })
}
// 获取系统维护模版CODE
export function getTemplateCode(params) {
  return request({
    url: '/basic/template/getTemplateCode',
    method: 'get',
    params,
  })
}
// 根据模板id和签章类型查询签章明细
export function getSign(params) {
  return request({
    url: '/basic/template/sign/getSign',
    method: 'get',
    params,
  })
}
// 签章保存
export function addSign(data) {
  return request({
    url: '/basic/template/sign/add',
    method: 'post',
    data,
  })
}
// doc转pdf
export function signToPdf(ossId) {
  return request({
    url: `/basic/template/sign/pdf/${ossId}`,
    method: 'get',
		responseType: "blob",
    headers: {
			isLoading: true,
		}
  })
}
